<html>

	<head>
		<meta charset="utf-8">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="minimal-ui=yes,width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	
		<title>优惠券</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="优惠券" />
		<meta name="Description" content="优惠券" />
		<link rel="stylesheet" type="text/css" href="__TMPL__Public/css/public.css" />
		<link rel="stylesheet" type="text/css" href="__TMPL__Public/css/category.css" />
		<script type="text/javascript" src="__TMPL__Public/js/jquery.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/jquery.json.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/transport.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/common.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/layer.js"></script>
		<script type="application/javascript" src="__TMPL__Public/js/jquery.more.js"></script>
		<style type="text/css">
			.filtrate_term li { width: 25%;}
		</style>
	</head>

	<body class="body_bj">
	<php>
		$agent = $_SERVER['HTTP_USER_AGENT'];
		if(strpos($agent,"Html5Plus") === false){
			if($_GET['id']){
				$height= 'height: 130px;';
			}
		}else{
			echo "<style>.shopheader-main{top:0!important;}</style>";
		}
	</php>
		<section class="_pre">
			<header id="head_search_box" style="position: fixed; top: 0px; width: 100%; z-index:9999;background: #fff;border-bottom: 1px #eee solid;{$height}">
				<?php
				$agent = $_SERVER['HTTP_USER_AGENT'];
				if(strpos($agent,"Html5Plus") === false){
			?>
				<div class="header" style=" position:relative">
					<div class="h-left">
						<a class="sb-back" href="javascript:history.back(-1)" title="返回"></a>
					</div>
					<div class="h-mid"> {$title} </div>
					<aside class="show-menu-btn">
						<div id="show_more" class="show-menu" style="float: right;margin-right: 8px;cursor: pointer;">
							<a href="javascript:;"></a>
						</div>
					</aside>
				</div>
				<?php
					}
				?>
				<php>
					if($_GET['id']){
				</php>
				<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Store/css/left_coupon.css">
				<div class="shopheader-main" style="padding: 16px 0;height: auto;background: #fff;">
					<img class="shopheader-logo"src="{$store_template_info.logo}" alt="{$store_info.title}" onclick="location.href='{:U("store/index",array("id"=>$_GET["id"]))}'">

					<div class="shopheader-content">
						<h2 class="shopheader-name" style="color: #000;" onclick="location.href='{:U("store/index",array("id"=>$_GET["id"]))}'">{$store_info.title}</h2>

						<div class="shopheader-activities">
							<ul>
								<li>
									<div class="activity-wrap nowrap">
										<span class="activity-description" style="color: #000;">公告：{$store_info.notice}  </span>
									</div>
								</li>
							</ul>
							<php>if($rsstoreinfo_status==1){</php>
							<div class="shopheader-activity-count SZY-SHOP-IS-COLLENT" data-shop_id="{$_GET['id']}" style="color: #fff;background: #f00;">
								<i class="i-favorite"></i>已收藏
							</div>
							<php>}else{</php>
							<div class="shopheader-activity-count SZY-SHOP-IS-COLLENT" data-shop_id="{$_GET['id']}" style="color: #fff;">
								<i class="i-favorite"></i>收藏
							</div>
							<php>}</php>
						</div>
					</div>
					<script type="text/javascript">
                        $(function(){
                            $('.SZY-SHOP-IS-COLLENT').click(function(){
                                var store_id=$(this).attr('data-shop_id');
                                $.post('/user/collect', {
                                    id: store_id,
                                    type: 2,
                                }, function(result) {
                                    if(result.code == 1) {
                                        layer.msg(result.message);
                                        $('.SZY-SHOP-IS-COLLENT').css('background','#f00');
                                        $('.SZY-SHOP-IS-COLLENT').css('color','#fff');
                                        $('.SZY-SHOP-IS-COLLENT').html('<i class="i-favorite"></i>已收藏')
                                    } else {
                                        layer.msg(result.message);

                                        $('.SZY-SHOP-IS-COLLENT').css('background','#CCCCCC');
                                        $('.SZY-SHOP-IS-COLLENT').html('<i class="i-favorite"></i>收藏')
                                    }
                                }, "json");
                            })
                        })

					</script>
				</div>
				<php>}</php>
			</header>
			<mtc_include file="Public:right_nav" />


			<php>
				$agent = $_SERVER['HTTP_USER_AGENT'];
				if(strpos($agent,"Html5Plus") === false){
					if($_GET['id']){
						echo '<div style="height:130px;" class="empty_div">&nbsp;</div>';
				     }else{
						echo '<div style="height:46px;" class="empty_div">&nbsp;</div>';
					}
				}else{
					echo '<div style="height:0px;" class="empty_div">&nbsp;</div>';
				}

			</php>
			<section class="filtrate_term" id="product_sort" style="width: 100%; z-index:9999; border-bottom:1px solid #CCC">
				<ul>
					<php>$orders=I('get.order',0);</php>
					<li <eq name="orders" value="0">class="on"</eq>> 
						<a href="{:U('list/coupons',array('id'=>$_GET['id'],'order'=>0))}">最新</a>
					</li>
					<li <eq name="orders" value="1">class="on"</eq>>
						<a href="{:U('list/coupons',array('id'=>$_GET['id'],'order'=>1))}">销量</a>
					</li>
					<li <eq name="orders" value="2">class="on"</eq>>
						<a href="{:U('list/coupons',array('id'=>$_GET['id'],'order'=>2))}">热门</a>
					</li>
					<li <eq name="orders" value="3">class="on"</eq> <eq name="orders" value="4">class="on"</eq>>
						<php>
							if($orders==3){
						</php>
							<a href="{:U('list/coupons',array('id'=>$_GET['id'],'order'=>4))}">价格<span class="arrow_up "></span><span class="arrow_down  <eq name='orders' value='3'>active_down</eq>"></span></a>
						<php>}else{</php>
						
							<a href="{:U('list/coupons',array('id'=>$_GET['id'],'order'=>3))}">价格<span class="arrow_up <eq name='orders' value='4'>active_up</eq>"></span><span class="arrow_down"></span></a>
						<php>}</php>
						
					</li>
					
				</ul>
			</section>
			<div style=" height:5px"></div>
			<script type="text/javascript">
				var url = "{:U('list/ajax_coupons',array('order'=>$_GET['order'],'store_id'=>$_GET['id']))}";
				$(function() {
					$('#J_ItemList').more({
						'address': url
					});
				});
			</script>
			<div class="touchweb-com_searchListBox" id="goods_list">
				<form action="javascript:void(0)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY">
					<div id="J_ItemList" style="opacity: 1;">
						<div class="product single_item info"></div>
						<a href="javascript:;" class="get_more">
						</a>
					</div>
				</form>
				

			</div>
			</div>
		</section>
	
		
		<mtc_include file="Public:footer" />
		<script>
			function goTop() {
				$('html,body').animate({
					'scrollTop': 0
				}, 600);
			}
		</script>
		<a href="javascript:goTop();" class="gotop" style=" z-index:9999"><img src="__TMPL__Public/picture/topup.png"></a>
	</body>

</html>